<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTransverseBillsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('transverse_bills', function (Blueprint $table) {
            $table->id();
            $table->integer('transverse_id')->comment('横向课题ID');
            $table->float('amount')->comment('到账金额');
            $table->date('pay_date')->nullable()->comment('到账时间');
            $table->text('remark')->nullable()->comment('备注');
            $table->integer('creator_id')->default(0)->comment('创建人');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('transverse_bills');
    }
}
